<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TTMath: ttmath Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="ttmath_logo_for_doxygen_doc.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TTMath
   &#160;<span id="projectnumber">0.9.4_prerelease_2019-07-31</span>
   </div>
   <div id="projectbrief">&nbsp;C++ bignum library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ttmath Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>a namespace for the TTMath library  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_big.html">Big</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classttmath_1_1_big.html" title="Big implements the floating point numbers.">Big</a> implements the floating point numbers.  <a href="classttmath_1_1_big.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structttmath_1_1_c_gamma.html">CGamma</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structttmath_1_1_conv.html">Conv</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_exception_info.html">ExceptionInfo</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_history.html">History</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_int.html">Int</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classttmath_1_1_int.html" title="Int implements a big integer value with a sign.">Int</a> implements a big integer value with a sign.  <a href="classttmath_1_1_int.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html">Misc</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_objects.html">Objects</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_parser.html">Parser</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mathematical parser.  <a href="classttmath_1_1_parser.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_reference_error.html">ReferenceError</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_runtime_error.html">RuntimeError</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_stop_calculating.html">StopCalculating</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_thread_lock.html">ThreadLock</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">objects of this class are used to synchronize  <a href="classttmath_1_1_thread_lock.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_u_int.html">UInt</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classttmath_1_1_u_int.html" title="UInt implements a big integer value without a sign.">UInt</a> implements a big integer value without a sign.  <a href="classttmath_1_1_u_int.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_u_int_3_010_01_4.html">UInt&lt; 0 &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a5c1fccc9761aaa3d2b6dd32c224f5dac"><td class="memItemLeft" align="right" valign="top">typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a></td></tr>
<tr class="separator:a5c1fccc9761aaa3d2b6dd32c224f5dac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b0a5dcba29a2c7a0abc8b4403a25ac4"><td class="memItemLeft" align="right" valign="top">typedef int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a4b0a5dcba29a2c7a0abc8b4403a25ac4">sint</a></td></tr>
<tr class="separator:a4b0a5dcba29a2c7a0abc8b4403a25ac4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a5c3bd12cd3d050852a60e022e5e12799"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a5c3bd12cd3d050852a60e022e5e12799">LibTypeCode</a> { <br />
&#160;&#160;<b>asm_vc_32</b> = 0, 
<b>asm_gcc_32</b>, 
<b>asm_vc_64</b>, 
<b>asm_gcc_64</b>, 
<br />
&#160;&#160;<b>no_asm_32</b>, 
<b>no_asm_64</b>
<br />
 }</td></tr>
<tr class="separator:a5c3bd12cd3d050852a60e022e5e12799"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af99599ccaf4dc05cc3a74277f9579942"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> { <br />
&#160;&#160;<b>err_ok</b> = 0, 
<b>err_nothing_has_read</b>, 
<b>err_unknown_character</b>, 
<b>err_unexpected_final_bracket</b>, 
<br />
&#160;&#160;<b>err_stack_not_clear</b>, 
<b>err_unknown_variable</b>, 
<b>err_division_by_zero</b>, 
<b>err_interrupt</b>, 
<br />
&#160;&#160;<b>err_overflow</b>, 
<b>err_unknown_function</b>, 
<b>err_unknown_operator</b>, 
<b>err_unexpected_semicolon_operator</b>, 
<br />
&#160;&#160;<b>err_improper_amount_of_arguments</b>, 
<b>err_improper_argument</b>, 
<b>err_unexpected_end</b>, 
<b>err_internal_error</b>, 
<br />
&#160;&#160;<b>err_incorrect_name</b>, 
<b>err_incorrect_value</b>, 
<b>err_variable_exists</b>, 
<b>err_variable_loop</b>, 
<br />
&#160;&#160;<b>err_functions_loop</b>, 
<b>err_must_be_only_one_value</b>, 
<b>err_object_exists</b>, 
<b>err_unknown_object</b>, 
<br />
&#160;&#160;<b>err_still_calculating</b>, 
<b>err_in_short_form_used_function</b>, 
<b>err_percent_from</b>, 
<b>err_assignment_requires_variable</b>
<br />
 }</td></tr>
<tr class="separator:af99599ccaf4dc05cc3a74277f9579942"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:add9faf7afbd33a91df3e3977789e741f"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:add9faf7afbd33a91df3e3977789e741f"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#add9faf7afbd33a91df3e3977789e741f">SkipFraction</a> (const ValueType &amp;x)</td></tr>
<tr class="separator:add9faf7afbd33a91df3e3977789e741f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c925f364f30f9d23f417ab7cc5689ee"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a0c925f364f30f9d23f417ab7cc5689ee"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a0c925f364f30f9d23f417ab7cc5689ee">Round</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a0c925f364f30f9d23f417ab7cc5689ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeea3642bd4218cf81761930515792844"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:aeea3642bd4218cf81761930515792844"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#aeea3642bd4218cf81761930515792844">Ceil</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:aeea3642bd4218cf81761930515792844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fde4af46141a3aad68c8081489fd70f"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a8fde4af46141a3aad68c8081489fd70f"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a8fde4af46141a3aad68c8081489fd70f">Floor</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a8fde4af46141a3aad68c8081489fd70f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc53780b7e2e744d0a680d8fae0d266a"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:abc53780b7e2e744d0a680d8fae0d266a"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#abc53780b7e2e744d0a680d8fae0d266a">Ln</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:abc53780b7e2e744d0a680d8fae0d266a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af773d2cf23612ce54bd229c506f2e884"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:af773d2cf23612ce54bd229c506f2e884"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#af773d2cf23612ce54bd229c506f2e884">Log</a> (const ValueType &amp;x, const ValueType &amp;base, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:af773d2cf23612ce54bd229c506f2e884"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f2347d11b3124a6d4c12b97b87f9b1"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ad2f2347d11b3124a6d4c12b97b87f9b1"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ad2f2347d11b3124a6d4c12b97b87f9b1">Exp</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:ad2f2347d11b3124a6d4c12b97b87f9b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadad290da85b89abcd3468c4ad38f556"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:aadad290da85b89abcd3468c4ad38f556"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">Sin</a> (ValueType x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:aadad290da85b89abcd3468c4ad38f556"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6c148c8360f8a1779d41e7ee8a20cc"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a8e6c148c8360f8a1779d41e7ee8a20cc"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a8e6c148c8360f8a1779d41e7ee8a20cc">Cos</a> (ValueType x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a8e6c148c8360f8a1779d41e7ee8a20cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa3658181511f2becb4a54e9888909c1"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:afa3658181511f2becb4a54e9888909c1"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#afa3658181511f2becb4a54e9888909c1">Tan</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:afa3658181511f2becb4a54e9888909c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52e247c28a10f610b776f5a14a73ccc9"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a52e247c28a10f610b776f5a14a73ccc9"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a52e247c28a10f610b776f5a14a73ccc9">Tg</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a52e247c28a10f610b776f5a14a73ccc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a729e7b140a09dec6a69f1c431648d97b"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a729e7b140a09dec6a69f1c431648d97b"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a729e7b140a09dec6a69f1c431648d97b">Cot</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a729e7b140a09dec6a69f1c431648d97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a968360479aa6f110c149acf85b174467"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a968360479aa6f110c149acf85b174467"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a968360479aa6f110c149acf85b174467">Ctg</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a968360479aa6f110c149acf85b174467"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56de53bf34882675055ce5a2c09b07dc"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a56de53bf34882675055ce5a2c09b07dc"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a56de53bf34882675055ce5a2c09b07dc">ASin</a> (ValueType x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a56de53bf34882675055ce5a2c09b07dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee077900462c931807bf72d6bae0f8f9"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:aee077900462c931807bf72d6bae0f8f9"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#aee077900462c931807bf72d6bae0f8f9">ACos</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:aee077900462c931807bf72d6bae0f8f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4cabefdca116455346cfda51a9964cb"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ac4cabefdca116455346cfda51a9964cb"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ac4cabefdca116455346cfda51a9964cb">ATan</a> (ValueType x)</td></tr>
<tr class="separator:ac4cabefdca116455346cfda51a9964cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e96d4b43c340c816cf21021165c654b"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a0e96d4b43c340c816cf21021165c654b"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a0e96d4b43c340c816cf21021165c654b">ATg</a> (const ValueType &amp;x)</td></tr>
<tr class="separator:a0e96d4b43c340c816cf21021165c654b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16977771af17c322b2dbacd26ab3f832"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a16977771af17c322b2dbacd26ab3f832"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a16977771af17c322b2dbacd26ab3f832">ACot</a> (const ValueType &amp;x)</td></tr>
<tr class="separator:a16977771af17c322b2dbacd26ab3f832"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b5eee4603490ab765b30984dd857e81"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a2b5eee4603490ab765b30984dd857e81"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a2b5eee4603490ab765b30984dd857e81">ACtg</a> (const ValueType &amp;x)</td></tr>
<tr class="separator:a2b5eee4603490ab765b30984dd857e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb7d8f5511b29ed42fa46c5d6da45140"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:abb7d8f5511b29ed42fa46c5d6da45140"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#abb7d8f5511b29ed42fa46c5d6da45140">Sinh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:abb7d8f5511b29ed42fa46c5d6da45140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af49359c6943998f68ec722dd717fdc71"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:af49359c6943998f68ec722dd717fdc71"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#af49359c6943998f68ec722dd717fdc71">Cosh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:af49359c6943998f68ec722dd717fdc71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61d39833ec57ac28ad81c018934c857a"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a61d39833ec57ac28ad81c018934c857a"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a61d39833ec57ac28ad81c018934c857a">Tanh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a61d39833ec57ac28ad81c018934c857a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3527548481a8319c1c12fd1f26dfe652"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a3527548481a8319c1c12fd1f26dfe652"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a3527548481a8319c1c12fd1f26dfe652">Tgh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a3527548481a8319c1c12fd1f26dfe652"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9446f17be78f1bb3a2a5cf99ec6eb7c5"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a9446f17be78f1bb3a2a5cf99ec6eb7c5"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a9446f17be78f1bb3a2a5cf99ec6eb7c5">Coth</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a9446f17be78f1bb3a2a5cf99ec6eb7c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13e6e549b97b7aea65e95e4141d8a92b"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a13e6e549b97b7aea65e95e4141d8a92b"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a13e6e549b97b7aea65e95e4141d8a92b">Ctgh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a13e6e549b97b7aea65e95e4141d8a92b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c25e4c8895dd02eace31b2cf2b4a376"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a5c25e4c8895dd02eace31b2cf2b4a376"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a5c25e4c8895dd02eace31b2cf2b4a376">ASinh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a5c25e4c8895dd02eace31b2cf2b4a376"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06b9a1ee1d7d3d4dc161c577b085045e"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a06b9a1ee1d7d3d4dc161c577b085045e"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a06b9a1ee1d7d3d4dc161c577b085045e">ACosh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a06b9a1ee1d7d3d4dc161c577b085045e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59fa5b80ce4752872465d02c4c01625c"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a59fa5b80ce4752872465d02c4c01625c"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a59fa5b80ce4752872465d02c4c01625c">ATanh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a59fa5b80ce4752872465d02c4c01625c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a975495c66ca3027dd1f44163cffa38b4"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a975495c66ca3027dd1f44163cffa38b4"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a975495c66ca3027dd1f44163cffa38b4">ATgh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a975495c66ca3027dd1f44163cffa38b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bb131b813c879e9e214ccf8a7eb3696"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a1bb131b813c879e9e214ccf8a7eb3696"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a1bb131b813c879e9e214ccf8a7eb3696">ACoth</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a1bb131b813c879e9e214ccf8a7eb3696"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3661cefb265dde03e1744db779812fcf"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a3661cefb265dde03e1744db779812fcf"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a3661cefb265dde03e1744db779812fcf">ACtgh</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a3661cefb265dde03e1744db779812fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6aac6162783d4ad6c5d78729f7fd21c"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ac6aac6162783d4ad6c5d78729f7fd21c"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ac6aac6162783d4ad6c5d78729f7fd21c">DegToRad</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:ac6aac6162783d4ad6c5d78729f7fd21c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5ef6c79581805ee4c0bbfd731857511"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:aa5ef6c79581805ee4c0bbfd731857511"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#aa5ef6c79581805ee4c0bbfd731857511">RadToDeg</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:aa5ef6c79581805ee4c0bbfd731857511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2fd073af0bd959717ac1a5784e5110d"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ac2fd073af0bd959717ac1a5784e5110d"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ac2fd073af0bd959717ac1a5784e5110d">DegToDeg</a> (const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:ac2fd073af0bd959717ac1a5784e5110d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25f85adf34074305414d7d7e4dbf1afd"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a25f85adf34074305414d7d7e4dbf1afd"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a25f85adf34074305414d7d7e4dbf1afd">DegToRad</a> (const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a25f85adf34074305414d7d7e4dbf1afd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16791351b7f09a2500c3bbd767a6d074"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a16791351b7f09a2500c3bbd767a6d074"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a16791351b7f09a2500c3bbd767a6d074">GradToRad</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a16791351b7f09a2500c3bbd767a6d074"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a1aa0f61f5e74abf53c7b36cef77d75"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a1a1aa0f61f5e74abf53c7b36cef77d75"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a1a1aa0f61f5e74abf53c7b36cef77d75">RadToGrad</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a1a1aa0f61f5e74abf53c7b36cef77d75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af08419af148d5546f44c97b5300c39d6"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:af08419af148d5546f44c97b5300c39d6"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#af08419af148d5546f44c97b5300c39d6">DegToGrad</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:af08419af148d5546f44c97b5300c39d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a9f4b16959a34525bccadd4fa5b3b31"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a4a9f4b16959a34525bccadd4fa5b3b31"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a4a9f4b16959a34525bccadd4fa5b3b31">DegToGrad</a> (const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a4a9f4b16959a34525bccadd4fa5b3b31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52eafea0946a3eda59db19fce03abd78"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a52eafea0946a3eda59db19fce03abd78"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a52eafea0946a3eda59db19fce03abd78">GradToDeg</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a52eafea0946a3eda59db19fce03abd78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef68f4994c6c514e97fd44f1d850f0e"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a4ef68f4994c6c514e97fd44f1d850f0e"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a4ef68f4994c6c514e97fd44f1d850f0e">Sqrt</a> (ValueType x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a4ef68f4994c6c514e97fd44f1d850f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b83986f71f6f78d6b0eb33d0e832654"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a3b83986f71f6f78d6b0eb33d0e832654"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a3b83986f71f6f78d6b0eb33d0e832654">Root</a> (ValueType x, const ValueType &amp;index, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a3b83986f71f6f78d6b0eb33d0e832654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73415d46abca7b89ea7bad780b152b9f"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a73415d46abca7b89ea7bad780b152b9f"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a73415d46abca7b89ea7bad780b152b9f">Abs</a> (const ValueType &amp;x)</td></tr>
<tr class="separator:a73415d46abca7b89ea7bad780b152b9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae489b629ef0887bdb3d9aa94e40383ae"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ae489b629ef0887bdb3d9aa94e40383ae"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ae489b629ef0887bdb3d9aa94e40383ae">Sgn</a> (ValueType x)</td></tr>
<tr class="separator:ae489b629ef0887bdb3d9aa94e40383ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53024d1c0076793b6ef66da1595e7ebf"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a53024d1c0076793b6ef66da1595e7ebf"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a53024d1c0076793b6ef66da1595e7ebf">Mod</a> (ValueType a, const ValueType &amp;b, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a53024d1c0076793b6ef66da1595e7ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf1312e301f4800c67164f4eb8a5e017"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:aaf1312e301f4800c67164f4eb8a5e017"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#aaf1312e301f4800c67164f4eb8a5e017">Gamma</a> (const ValueType &amp;n, <a class="el" href="structttmath_1_1_c_gamma.html">CGamma</a>&lt; ValueType &gt; &amp;cgamma, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0, const volatile <a class="el" href="classttmath_1_1_stop_calculating.html">StopCalculating</a> *stop=0)</td></tr>
<tr class="separator:aaf1312e301f4800c67164f4eb8a5e017"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dc16e4ff84855b18fa0def0115beeb0"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:a9dc16e4ff84855b18fa0def0115beeb0"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#a9dc16e4ff84855b18fa0def0115beeb0">Gamma</a> (const ValueType &amp;n, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:a9dc16e4ff84855b18fa0def0115beeb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0a248c8618c9ac4e3edf6095fe31f92"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ae0a248c8618c9ac4e3edf6095fe31f92"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ae0a248c8618c9ac4e3edf6095fe31f92">Factorial</a> (const ValueType &amp;x, <a class="el" href="structttmath_1_1_c_gamma.html">CGamma</a>&lt; ValueType &gt; &amp;cgamma, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0, const volatile <a class="el" href="classttmath_1_1_stop_calculating.html">StopCalculating</a> *stop=0)</td></tr>
<tr class="separator:ae0a248c8618c9ac4e3edf6095fe31f92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8d7f0fbe3a72a59c32717f8eafe5857"><td class="memTemplParams" colspan="2">template&lt;class ValueType &gt; </td></tr>
<tr class="memitem:ab8d7f0fbe3a72a59c32717f8eafe5857"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacettmath.html#ab8d7f0fbe3a72a59c32717f8eafe5857">Factorial</a> (const ValueType &amp;x, <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *err=0)</td></tr>
<tr class="separator:ab8d7f0fbe3a72a59c32717f8eafe5857"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:af7ec4eb78a37bd53d8a6ec921be57288"><td class="memItemLeft" align="right" valign="top">pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacettmath.html#af7ec4eb78a37bd53d8a6ec921be57288">ttmath_mutex</a></td></tr>
<tr class="separator:af7ec4eb78a37bd53d8a6ec921be57288"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>a namespace for the TTMath library </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a4b0a5dcba29a2c7a0abc8b4403a25ac4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b0a5dcba29a2c7a0abc8b4403a25ac4">&#9670;&nbsp;</a></span>sint</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int64_t <a class="el" href="namespacettmath.html#a4b0a5dcba29a2c7a0abc8b4403a25ac4">ttmath::sint</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>on 64bit platforms one word (uint, sint) will be equal 64bits </p>

<p class="definition">Definition at line <a class="el" href="ttmathtypes_8h_source.html#l00243">243</a> of file <a class="el" href="ttmathtypes_8h_source.html">ttmathtypes.h</a>.</p>

</div>
</div>
<a id="a5c1fccc9761aaa3d2b6dd32c224f5dac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c1fccc9761aaa3d2b6dd32c224f5dac">&#9670;&nbsp;</a></span>uint</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef uint64_t <a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>on 64bit platforms one word (uint, sint) will be equal 64bits </p>

<p class="definition">Definition at line <a class="el" href="ttmathtypes_8h_source.html#l00238">238</a> of file <a class="el" href="ttmathtypes_8h_source.html">ttmathtypes.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="af99599ccaf4dc05cc3a74277f9579942"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af99599ccaf4dc05cc3a74277f9579942">&#9670;&nbsp;</a></span>ErrorCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ttmath::ErrorCode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>error codes </p>

<p class="definition">Definition at line <a class="el" href="ttmathtypes_8h_source.html#l00370">370</a> of file <a class="el" href="ttmathtypes_8h_source.html">ttmathtypes.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    {</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        err_ok = 0,</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        err_nothing_has_read,</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        err_unknown_character,</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;        err_unexpected_final_bracket,</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;        err_stack_not_clear,</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;        err_unknown_variable,</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        err_division_by_zero,</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;        err_interrupt,</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        err_overflow,</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        err_unknown_function,</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        err_unknown_operator,</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        err_unexpected_semicolon_operator,</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;        err_improper_amount_of_arguments,</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        err_improper_argument,</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        err_unexpected_end,</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;        err_internal_error,</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        err_incorrect_name,</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        err_incorrect_value,</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        err_variable_exists,</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        err_variable_loop,</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        err_functions_loop,</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;        err_must_be_only_one_value,</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        err_object_exists,</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        err_unknown_object,</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        err_still_calculating,</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;        err_in_short_form_used_function,</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        err_percent_from,</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;        err_assignment_requires_variable</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    };</div></div><!-- fragment -->
</div>
</div>
<a id="a5c3bd12cd3d050852a60e022e5e12799"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c3bd12cd3d050852a60e022e5e12799">&#9670;&nbsp;</a></span>LibTypeCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="namespacettmath.html#a5c3bd12cd3d050852a60e022e5e12799">ttmath::LibTypeCode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>lib type codes:</p><ul>
<li>asm_vc_32 - with asm code designed for Microsoft Visual C++ (32 bits)</li>
<li>asm_gcc_32 - with asm code designed for GCC (32 bits)</li>
<li>asm_vc_64 - with asm for VC (64 bit)</li>
<li>asm_gcc_64 - with asm for GCC (64 bit)</li>
<li>no_asm_32 - pure C++ version (32 bit) - without any asm code</li>
<li>no_asm_64 - pure C++ version (64 bit) - without any asm code </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmathtypes_8h_source.html#l00356">356</a> of file <a class="el" href="ttmathtypes_8h_source.html">ttmathtypes.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    {</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;      asm_vc_32 = 0,</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;      asm_gcc_32,</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;      asm_vc_64,</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;      asm_gcc_64,</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;      no_asm_32,</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;      no_asm_64</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;    };</div></div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a73415d46abca7b89ea7bad780b152b9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73415d46abca7b89ea7bad780b152b9f">&#9670;&nbsp;</a></span>Abs()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Abs </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>absolute value of x</p>
<p>samples:</p><ul>
<li>-2 = 2</li>
<li>2 = 2 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02137">2137</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02138"></a><span class="lineno"> 2138</span>&#160;    {</div><div class="line"><a name="l02139"></a><span class="lineno"> 2139</span>&#160;        ValueType result( x );</div><div class="line"><a name="l02140"></a><span class="lineno"> 2140</span>&#160;        result.Abs();</div><div class="line"><a name="l02141"></a><span class="lineno"> 2141</span>&#160;</div><div class="line"><a name="l02142"></a><span class="lineno"> 2142</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l02143"></a><span class="lineno"> 2143</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a id="aee077900462c931807bf72d6bae0f8f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee077900462c931807bf72d6bae0f8f9">&#9670;&nbsp;</a></span>ACos()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ACos </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Arc Cosine</p>
<p>we're using the formula: acos(x) = pi/2 - asin(x) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00910">910</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;    {</div><div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;    ValueType temp;</div><div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;</div><div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;        temp.Set05Pi();</div><div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;        temp.Sub(<a class="code" href="namespacettmath.html#a56de53bf34882675055ce5a2c09b07dc">ASin</a>(x, err));</div><div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;</div><div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;    <span class="keywordflow">return</span> temp;</div><div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a56de53bf34882675055ce5a2c09b07dc"><div class="ttname"><a href="namespacettmath.html#a56de53bf34882675055ce5a2c09b07dc">ttmath::ASin</a></div><div class="ttdeci">ValueType ASin(ValueType x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00855">ttmath.h:855</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l00855">ASin()</a>.</p>

</div>
</div>
<a id="a06b9a1ee1d7d3d4dc161c577b085045e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06b9a1ee1d7d3d4dc161c577b085045e">&#9670;&nbsp;</a></span>ACosh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ACosh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inverse hyperbolic cosine</p>
<p>acosh(x) = ln( x + sqrt(x^2 - 1) ) x in &lt;1, infinity) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01387">1387</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01388"></a><span class="lineno"> 1388</span>&#160;    {</div><div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01390"></a><span class="lineno"> 1390</span>&#160;        {</div><div class="line"><a name="l01391"></a><span class="lineno"> 1391</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01392"></a><span class="lineno"> 1392</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01393"></a><span class="lineno"> 1393</span>&#160;</div><div class="line"><a name="l01394"></a><span class="lineno"> 1394</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01395"></a><span class="lineno"> 1395</span>&#160;        }</div><div class="line"><a name="l01396"></a><span class="lineno"> 1396</span>&#160;</div><div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>&#160;        ValueType xx(x), one, result;</div><div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01399"></a><span class="lineno"> 1399</span>&#160;        one.SetOne();</div><div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>&#160;</div><div class="line"><a name="l01401"></a><span class="lineno"> 1401</span>&#160;        <span class="keywordflow">if</span>( x &lt; one )</div><div class="line"><a name="l01402"></a><span class="lineno"> 1402</span>&#160;        {</div><div class="line"><a name="l01403"></a><span class="lineno"> 1403</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01404"></a><span class="lineno"> 1404</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>&#160;</div><div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>&#160;        <span class="keywordflow">return</span> result; <span class="comment">// NaN is set by default</span></div><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;        }</div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;</div><div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>&#160;        c += xx.Mul(x);</div><div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>&#160;        c += xx.Sub(one);</div><div class="line"><a name="l01411"></a><span class="lineno"> 1411</span>&#160;        <span class="comment">// xx is &gt;= 0</span></div><div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>&#160;        <span class="comment">// we can&#39;t call a PowFrac when the &#39;x&#39; is zero</span></div><div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>&#160;        <span class="comment">// if x is 0 the sqrt(0) is 0</span></div><div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>&#160;        <span class="keywordflow">if</span>( !xx.IsZero() )</div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>&#160;        {</div><div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>&#160;            one.exponent.SubOne(); <span class="comment">// one=0.5</span></div><div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>&#160;            c += xx.PowFrac(one); <span class="comment">// xx=sqrt(xx)</span></div><div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>&#160;        }</div><div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>&#160;        c += xx.Add(x);</div><div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>&#160;        c += result.Ln(xx); <span class="comment">// xx &gt;= 1</span></div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>&#160;</div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>&#160;        <span class="comment">// here can only be a carry</span></div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>&#160;</div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a16977771af17c322b2dbacd26ab3f832"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16977771af17c322b2dbacd26ab3f832">&#9670;&nbsp;</a></span>ACot()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ACot </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Arc Cotangent</p>
<p>we're using the formula: actan(x) = pi/2 - atan(x) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01136">1136</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;    {</div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;    ValueType result;</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;</div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;        result.Set05Pi();</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;        result.Sub(<a class="code" href="namespacettmath.html#ac4cabefdca116455346cfda51a9964cb">ATan</a>(x));</div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;</div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_ac4cabefdca116455346cfda51a9964cb"><div class="ttname"><a href="namespacettmath.html#ac4cabefdca116455346cfda51a9964cb">ttmath::ATan</a></div><div class="ttdeci">ValueType ATan(ValueType x)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01085">ttmath.h:1085</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01085">ATan()</a>.</p>

<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01154">ACtg()</a>.</p>

</div>
</div>
<a id="a1bb131b813c879e9e214ccf8a7eb3696"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bb131b813c879e9e214ccf8a7eb3696">&#9670;&nbsp;</a></span>ACoth()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ACoth </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inverse hyperbolic cotangent</p>
<p>acoth(x) = 0.5 * ln( (x+1) / (x-1) ) x in (-infinity, -1) or (1, infinity) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01489">1489</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>&#160;    {</div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>&#160;        {</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>&#160;</div><div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;        }</div><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;        ValueType nominator(x), denominator(x), one, result;</div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;        one.SetOne();</div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;</div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;        <span class="keywordflow">if</span>( !x.GreaterWithoutSignThan(one) )</div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160;        {</div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;</div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;        <span class="keywordflow">return</span> result; <span class="comment">// NaN is set by default</span></div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;        }</div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>&#160;</div><div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;        c += nominator.Add(one);</div><div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;        c += denominator.Sub(one);</div><div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>&#160;        c += nominator.Div(denominator);</div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;        c += result.Ln(nominator);</div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;        c += result.exponent.SubOne();</div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;</div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;        <span class="comment">// here can only be a carry</span></div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;</div><div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01529">ACtgh()</a>.</p>

</div>
</div>
<a id="a2b5eee4603490ab765b30984dd857e81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b5eee4603490ab765b30984dd857e81">&#9670;&nbsp;</a></span>ACtg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ACtg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Arc Cotangent look at the description of ACot(...)</p>
<p>(the abbreviation of Arc Cotangent can be 'actg' as well) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01154">1154</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;    {</div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a16977771af17c322b2dbacd26ab3f832">ACot</a>(x);</div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a16977771af17c322b2dbacd26ab3f832"><div class="ttname"><a href="namespacettmath.html#a16977771af17c322b2dbacd26ab3f832">ttmath::ACot</a></div><div class="ttdeci">ValueType ACot(const ValueType &amp;x)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01136">ttmath.h:1136</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01136">ACot()</a>.</p>

</div>
</div>
<a id="a3661cefb265dde03e1744db779812fcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3661cefb265dde03e1744db779812fcf">&#9670;&nbsp;</a></span>ACtgh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ACtgh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inverse hyperbolic cotantent </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01529">1529</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160;    {</div><div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a1bb131b813c879e9e214ccf8a7eb3696">ACoth</a>(x, err);</div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a1bb131b813c879e9e214ccf8a7eb3696"><div class="ttname"><a href="namespacettmath.html#a1bb131b813c879e9e214ccf8a7eb3696">ttmath::ACoth</a></div><div class="ttdeci">ValueType ACoth(const ValueType &amp;x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01489">ttmath.h:1489</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01489">ACoth()</a>.</p>

</div>
</div>
<a id="a56de53bf34882675055ce5a2c09b07dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56de53bf34882675055ce5a2c09b07dc">&#9670;&nbsp;</a></span>ASin()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ASin </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Arc Sine x is from &lt;-1,1&gt; </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00855">855</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;    {</div><div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;    <span class="keyword">using namespace </span>auxiliaryfunctions;</div><div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;</div><div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;        ValueType result, one;</div><div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;        one.SetOne();</div><div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;        <span class="keywordtype">bool</span> change_sign = <span class="keyword">false</span>;</div><div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;</div><div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;        {</div><div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;</div><div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;        }</div><div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;</div><div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;        <span class="keywordflow">if</span>( x.GreaterWithoutSignThan(one) )</div><div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;        {</div><div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;</div><div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;            <span class="keywordflow">return</span> result; <span class="comment">// NaN is set by default</span></div><div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;        }</div><div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;</div><div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;        <span class="keywordflow">if</span>( x.IsSign() )</div><div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;        {</div><div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;            change_sign = <span class="keyword">true</span>;</div><div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;            x.Abs();</div><div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;        }</div><div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;</div><div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;        one.exponent.SubOne(); <span class="comment">// =0.5</span></div><div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;</div><div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;        <span class="comment">// asin(-x) = -asin(x)</span></div><div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;        <span class="keywordflow">if</span>( x.GreaterWithoutSignThan(one) )</div><div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;            result = ASin_1(x); </div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;            result = ASin_0(x);</div><div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;</div><div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;        <span class="keywordflow">if</span>( change_sign )</div><div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;            result.ChangeSign();</div><div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;</div><div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;            *err = err_ok;</div><div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;</div><div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;    }</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l00910">ACos()</a>.</p>

</div>
</div>
<a id="a5c25e4c8895dd02eace31b2cf2b4a376"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c25e4c8895dd02eace31b2cf2b4a376">&#9670;&nbsp;</a></span>ASinh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ASinh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inverse hyperbolic sine</p>
<p>asinh(x) = ln( x + sqrt(x^2 + 1) ) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01351">1351</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160;    {</div><div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160;        {</div><div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160;</div><div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>&#160;        }</div><div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>&#160;</div><div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>&#160;        ValueType xx(x), one, result;</div><div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>&#160;        one.SetOne();</div><div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>&#160;</div><div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160;        c += xx.Mul(x);</div><div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>&#160;        c += xx.Add(one);</div><div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>&#160;        one.exponent.SubOne(); <span class="comment">// one=0.5</span></div><div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>&#160;        <span class="comment">// xx is &gt;= 1 </span></div><div class="line"><a name="l01369"></a><span class="lineno"> 1369</span>&#160;        c += xx.PowFrac(one); <span class="comment">// xx=sqrt(xx)</span></div><div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>&#160;        c += xx.Add(x);</div><div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>&#160;        c += result.Ln(xx); <span class="comment">// xx &gt; 0</span></div><div class="line"><a name="l01372"></a><span class="lineno"> 1372</span>&#160;</div><div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>&#160;        <span class="comment">// here can only be a carry</span></div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>&#160;</div><div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01378"></a><span class="lineno"> 1378</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ac4cabefdca116455346cfda51a9964cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4cabefdca116455346cfda51a9964cb">&#9670;&nbsp;</a></span>ATan()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ATan </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Arc Tangent </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01085">1085</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;    {</div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;    <span class="keyword">using namespace </span>auxiliaryfunctions;</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;</div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160;        ValueType one, result;</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;        one.SetOne();</div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;        <span class="keywordtype">bool</span> change_sign = <span class="keyword">false</span>;</div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;            <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;        <span class="comment">// if x is negative we&#39;re using the formula:</span></div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;        <span class="comment">// atan(-x) = -atan(x)</span></div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;        <span class="keywordflow">if</span>( x.IsSign() )</div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;        {</div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;            change_sign = <span class="keyword">true</span>;</div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;            x.Abs();</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;        }</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;        <span class="keywordflow">if</span>( x.GreaterWithoutSignThan(one) )</div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;            result = ATanGreaterThanPlusOne(x);</div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;            result = ATan01(x);</div><div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;        <span class="keywordflow">if</span>( change_sign )</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;            result.ChangeSign();</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;</div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;    }</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01136">ACot()</a>, and <a class="el" href="ttmath_8h_source.html#l01123">ATg()</a>.</p>

</div>
</div>
<a id="a59fa5b80ce4752872465d02c4c01625c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59fa5b80ce4752872465d02c4c01625c">&#9670;&nbsp;</a></span>ATanh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ATanh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inverse hyperbolic tangent</p>
<p>atanh(x) = 0.5 * ln( (1+x) / (1-x) ) x in (-1, 1) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01436">1436</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160;    {</div><div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>&#160;        {</div><div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>&#160;</div><div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>&#160;        }</div><div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>&#160;</div><div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>&#160;        ValueType nominator(x), denominator, one, result;</div><div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01448"></a><span class="lineno"> 1448</span>&#160;        one.SetOne();</div><div class="line"><a name="l01449"></a><span class="lineno"> 1449</span>&#160;</div><div class="line"><a name="l01450"></a><span class="lineno"> 1450</span>&#160;        <span class="keywordflow">if</span>( !x.SmallerWithoutSignThan(one) )</div><div class="line"><a name="l01451"></a><span class="lineno"> 1451</span>&#160;        {</div><div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01454"></a><span class="lineno"> 1454</span>&#160;</div><div class="line"><a name="l01455"></a><span class="lineno"> 1455</span>&#160;        <span class="keywordflow">return</span> result; <span class="comment">// NaN is set by default</span></div><div class="line"><a name="l01456"></a><span class="lineno"> 1456</span>&#160;        }</div><div class="line"><a name="l01457"></a><span class="lineno"> 1457</span>&#160;</div><div class="line"><a name="l01458"></a><span class="lineno"> 1458</span>&#160;        c += nominator.Add(one);</div><div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>&#160;        denominator = one;</div><div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>&#160;        c += denominator.Sub(x);</div><div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>&#160;        c += nominator.Div(denominator);</div><div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>&#160;        c += result.Ln(nominator);</div><div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>&#160;        c += result.exponent.SubOne();</div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;</div><div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160;        <span class="comment">// here can only be a carry</span></div><div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>&#160;</div><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01477">ATgh()</a>.</p>

</div>
</div>
<a id="a0e96d4b43c340c816cf21021165c654b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e96d4b43c340c816cf21021165c654b">&#9670;&nbsp;</a></span>ATg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ATg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Arc Tangent look at the description of ATan(...)</p>
<p>(the abbreviation of Arc Tangent can be 'atg' as well) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01123">1123</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;    {</div><div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#ac4cabefdca116455346cfda51a9964cb">ATan</a>(x);</div><div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_ac4cabefdca116455346cfda51a9964cb"><div class="ttname"><a href="namespacettmath.html#ac4cabefdca116455346cfda51a9964cb">ttmath::ATan</a></div><div class="ttdeci">ValueType ATan(ValueType x)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01085">ttmath.h:1085</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01085">ATan()</a>.</p>

</div>
</div>
<a id="a975495c66ca3027dd1f44163cffa38b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a975495c66ca3027dd1f44163cffa38b4">&#9670;&nbsp;</a></span>ATgh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::ATgh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inverse hyperbolic tantent </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01477">1477</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;    {</div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a59fa5b80ce4752872465d02c4c01625c">ATanh</a>(x, err);</div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a59fa5b80ce4752872465d02c4c01625c"><div class="ttname"><a href="namespacettmath.html#a59fa5b80ce4752872465d02c4c01625c">ttmath::ATanh</a></div><div class="ttdeci">ValueType ATanh(const ValueType &amp;x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01436">ttmath.h:1436</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01436">ATanh()</a>.</p>

</div>
</div>
<a id="aeea3642bd4218cf81761930515792844"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeea3642bd4218cf81761930515792844">&#9670;&nbsp;</a></span>Ceil()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Ceil </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function returns a value representing the smallest integer that is greater than or equal to x</p>
<ul>
<li>Ceil(-3.7) = -3</li>
<li>Ceil(-3.1) = -3</li>
<li>Ceil(-3.0) = -3</li>
<li>Ceil(4.0) = 4</li>
<li>Ceil(4.2) = 5</li>
<li>Ceil(4.8) = 5 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00142">142</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    {</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        {</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        }</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        ValueType result(x);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        result.SkipFraction();</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">if</span>( result != x )</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <span class="comment">// x is with fraction</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            <span class="comment">// if x is negative we don&#39;t have to do anything</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            <span class="keywordflow">if</span>( !x.IsSign() )</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            {</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                ValueType one;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                one.SetOne();</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                c += result.Add(one);</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;            }</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        }</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">return</span> result;  </div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a8e6c148c8360f8a1779d41e7ee8a20cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e6c148c8360f8a1779d41e7ee8a20cc">&#9670;&nbsp;</a></span>Cos()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Cos </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calulates the Cosine we're using the formula cos(x) = sin(x + PI/2) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00581">581</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;    {</div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;        {</div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;        }</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;        ValueType pi05;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;        pi05.Set05Pi();</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = x.Add( pi05 );</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;</div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;        <span class="keywordflow">if</span>( c )</div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;        {</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;                *err = err_overflow;</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;    </div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        <span class="keywordflow">return</span> ValueType(); <span class="comment">// result is undefined (NaN is set by default)</span></div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        }</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">Sin</a>(x, err);</div><div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_aadad290da85b89abcd3468c4ad38f556"><div class="ttname"><a href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">ttmath::Sin</a></div><div class="ttdeci">ValueType Sin(ValueType x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00525">ttmath.h:525</a></div></div>
<div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l00525">Sin()</a>.</p>

<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l00661">Cot()</a>, and <a class="el" href="ttmath_8h_source.html#l00619">Tan()</a>.</p>

</div>
</div>
<a id="af49359c6943998f68ec722dd717fdc71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af49359c6943998f68ec722dd717fdc71">&#9670;&nbsp;</a></span>Cosh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Cosh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Hyperbolic Cosine</p>
<p>we're using the formula cosh(x)= ( e^x + e^(-x) ) / 2 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01206">1206</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;    {</div><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;        {</div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160;</div><div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;        }</div><div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;</div><div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160;        ValueType ex, emx;</div><div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;</div><div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;        c += ex.Exp(x);</div><div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;        c += emx.Exp(-x);</div><div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>&#160;</div><div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>&#160;        c += ex.Add(emx);</div><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;        c += ex.exponent.SubOne();</div><div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160;</div><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;</div><div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;    <span class="keywordflow">return</span> ex;</div><div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a729e7b140a09dec6a69f1c431648d97b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a729e7b140a09dec6a69f1c431648d97b">&#9670;&nbsp;</a></span>Cot()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Cot </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calulates the Cotangent we're using the formula tan(x) = cos(x) / sin(x)</p>
<p>(why do we make it in this way? look at information in <a class="el" href="namespacettmath.html#afa3658181511f2becb4a54e9888909c1">Tan()</a> function) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00661">661</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    {</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;        ValueType result = <a class="code" href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">Sin</a>(x, err);</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;        <span class="keywordflow">if</span>( err &amp;&amp; *err != err_ok )</div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;        <span class="keywordflow">if</span>( result.IsZero() )</div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;        {</div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;</div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;            result.SetNan();</div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;</div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;        <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;        }</div><div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;    </div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a8e6c148c8360f8a1779d41e7ee8a20cc">Cos</a>(x, err) / result;</div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_aadad290da85b89abcd3468c4ad38f556"><div class="ttname"><a href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">ttmath::Sin</a></div><div class="ttdeci">ValueType Sin(ValueType x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00525">ttmath.h:525</a></div></div>
<div class="ttc" id="namespacettmath_html_a8e6c148c8360f8a1779d41e7ee8a20cc"><div class="ttname"><a href="namespacettmath.html#a8e6c148c8360f8a1779d41e7ee8a20cc">ttmath::Cos</a></div><div class="ttdeci">ValueType Cos(ValueType x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00581">ttmath.h:581</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l00581">Cos()</a>, and <a class="el" href="ttmath_8h_source.html#l00525">Sin()</a>.</p>

<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l00689">Ctg()</a>.</p>

</div>
</div>
<a id="a9446f17be78f1bb3a2a5cf99ec6eb7c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9446f17be78f1bb3a2a5cf99ec6eb7c5">&#9670;&nbsp;</a></span>Coth()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Coth </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Hyperbolic Cotangent</p>
<p>we're using the formula coth(x)= ( e^x + e^(-x) ) / ( e^x - e^(-x) ) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01286">1286</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160;    {</div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160;        {</div><div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160;</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160;        }</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160;</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;        <span class="keywordflow">if</span>( x.IsZero() )</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;        {</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160;</div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;            <span class="keywordflow">return</span> ValueType(); <span class="comment">// NaN is set by default</span></div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;        }</div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;</div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>&#160;        ValueType ex, emx, nominator, denominator;</div><div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>&#160;</div><div class="line"><a name="l01307"></a><span class="lineno"> 1307</span>&#160;        c += ex.Exp(x);</div><div class="line"><a name="l01308"></a><span class="lineno"> 1308</span>&#160;        c += emx.Exp(-x);</div><div class="line"><a name="l01309"></a><span class="lineno"> 1309</span>&#160;</div><div class="line"><a name="l01310"></a><span class="lineno"> 1310</span>&#160;        nominator = ex;</div><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>&#160;        c += nominator.Add(emx);</div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160;        denominator = ex;</div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160;        c += denominator.Sub(emx);</div><div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>&#160;        </div><div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>&#160;        c += nominator.Div(denominator);</div><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>&#160;</div><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160;</div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160;    <span class="keywordflow">return</span> nominator;</div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01331">Ctgh()</a>.</p>

</div>
</div>
<a id="a968360479aa6f110c149acf85b174467"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a968360479aa6f110c149acf85b174467">&#9670;&nbsp;</a></span>Ctg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Ctg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calulates the Cotangent look at the description of Cot(...)</p>
<p>(the abbreviation of Cotangent can be 'ctg' as well) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00689">689</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;    {</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a729e7b140a09dec6a69f1c431648d97b">Cot</a>(x, err);</div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a729e7b140a09dec6a69f1c431648d97b"><div class="ttname"><a href="namespacettmath.html#a729e7b140a09dec6a69f1c431648d97b">ttmath::Cot</a></div><div class="ttdeci">ValueType Cot(const ValueType &amp;x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00661">ttmath.h:661</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l00661">Cot()</a>.</p>

</div>
</div>
<a id="a13e6e549b97b7aea65e95e4141d8a92b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13e6e549b97b7aea65e95e4141d8a92b">&#9670;&nbsp;</a></span>Ctgh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Ctgh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Hyperbolic Cotangent look at the description of Coth(...)</p>
<p>(the abbreviation of Hyperbolic Cotangent can be 'ctgh' as well) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01331">1331</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01332"></a><span class="lineno"> 1332</span>&#160;    {</div><div class="line"><a name="l01333"></a><span class="lineno"> 1333</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a9446f17be78f1bb3a2a5cf99ec6eb7c5">Coth</a>(x, err);</div><div class="line"><a name="l01334"></a><span class="lineno"> 1334</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a9446f17be78f1bb3a2a5cf99ec6eb7c5"><div class="ttname"><a href="namespacettmath.html#a9446f17be78f1bb3a2a5cf99ec6eb7c5">ttmath::Coth</a></div><div class="ttdeci">ValueType Coth(const ValueType &amp;x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01286">ttmath.h:1286</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01286">Coth()</a>.</p>

</div>
</div>
<a id="ac2fd073af0bd959717ac1a5784e5110d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2fd073af0bd959717ac1a5784e5110d">&#9670;&nbsp;</a></span>DegToDeg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::DegToDeg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts degrees in the long format into one value</p>
<p>long format: (degrees, minutes, seconds) minutes and seconds must be greater than or equal zero</p>
<p>result:</p><ul>
<li>if d&gt;=0 : result= d + ((s/60)+m)/60</li>
<li>if d&lt;0 : result= d - ((s/60)+m)/60</li>
</ul>
<p>((s/60)+m)/60 = (s+60*m)/3600 (second version is faster because there's only one division)</p>
<p>samples:</p>
<ul>
<li>DegToDeg(10, 30, 0) = 10.5</li>
<li>DegToDeg(10, 24, 35.6)=10.4098(8) </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01633">1633</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>&#160;    {</div><div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>&#160;    ValueType delimiter, multipler;</div><div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01638"></a><span class="lineno"> 1638</span>&#160;</div><div class="line"><a name="l01639"></a><span class="lineno"> 1639</span>&#160;        <span class="keywordflow">if</span>( d.IsNan() || m.IsNan() || s.IsNan() || m.IsSign() || s.IsSign() )</div><div class="line"><a name="l01640"></a><span class="lineno"> 1640</span>&#160;        {</div><div class="line"><a name="l01641"></a><span class="lineno"> 1641</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01642"></a><span class="lineno"> 1642</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01643"></a><span class="lineno"> 1643</span>&#160;</div><div class="line"><a name="l01644"></a><span class="lineno"> 1644</span>&#160;            delimiter.SetZeroNan(); <span class="comment">// not needed, only to get rid of GCC warning about an uninitialized variable</span></div><div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>&#160;</div><div class="line"><a name="l01646"></a><span class="lineno"> 1646</span>&#160;        <span class="keywordflow">return</span> delimiter;</div><div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>&#160;        }</div><div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;</div><div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>&#160;        multipler = 60;</div><div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>&#160;        delimiter = 3600;</div><div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>&#160;</div><div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>&#160;        c += multipler.Mul(m);</div><div class="line"><a name="l01653"></a><span class="lineno"> 1653</span>&#160;        c += multipler.Add(s);</div><div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>&#160;        c += multipler.Div(delimiter);</div><div class="line"><a name="l01655"></a><span class="lineno"> 1655</span>&#160;</div><div class="line"><a name="l01656"></a><span class="lineno"> 1656</span>&#160;        <span class="keywordflow">if</span>( d.IsSign() )</div><div class="line"><a name="l01657"></a><span class="lineno"> 1657</span>&#160;            multipler.ChangeSign();</div><div class="line"><a name="l01658"></a><span class="lineno"> 1658</span>&#160;</div><div class="line"><a name="l01659"></a><span class="lineno"> 1659</span>&#160;        c += multipler.Add(d);</div><div class="line"><a name="l01660"></a><span class="lineno"> 1660</span>&#160;</div><div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>&#160;</div><div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>&#160;    <span class="keywordflow">return</span> multipler;</div><div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01790">DegToGrad()</a>, and <a class="el" href="ttmath_8h_source.html#l01672">DegToRad()</a>.</p>

</div>
</div>
<a id="af08419af148d5546f44c97b5300c39d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af08419af148d5546f44c97b5300c39d6">&#9670;&nbsp;</a></span>DegToGrad() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::DegToGrad </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts degrees to gradians</p>
<p>it returns: x * 200 / 180 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01758">1758</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>&#160;    {</div><div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>&#160;    ValueType result, temp;</div><div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;</div><div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>&#160;        {</div><div class="line"><a name="l01765"></a><span class="lineno"> 1765</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>&#160;</div><div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160;        }</div><div class="line"><a name="l01770"></a><span class="lineno"> 1770</span>&#160;</div><div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>&#160;        result = x;</div><div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>&#160;</div><div class="line"><a name="l01773"></a><span class="lineno"> 1773</span>&#160;        temp = 200;</div><div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>&#160;        c += result.Mul(temp);</div><div class="line"><a name="l01775"></a><span class="lineno"> 1775</span>&#160;</div><div class="line"><a name="l01776"></a><span class="lineno"> 1776</span>&#160;        temp = 180;</div><div class="line"><a name="l01777"></a><span class="lineno"> 1777</span>&#160;        c += result.Div(temp);</div><div class="line"><a name="l01778"></a><span class="lineno"> 1778</span>&#160;</div><div class="line"><a name="l01779"></a><span class="lineno"> 1779</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01780"></a><span class="lineno"> 1780</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01781"></a><span class="lineno"> 1781</span>&#160;</div><div class="line"><a name="l01782"></a><span class="lineno"> 1782</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01790">DegToGrad()</a>.</p>

</div>
</div>
<a id="a4a9f4b16959a34525bccadd4fa5b3b31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a9f4b16959a34525bccadd4fa5b3b31">&#9670;&nbsp;</a></span>DegToGrad() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::DegToGrad </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts degrees in the long format to gradians </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01790">1790</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01792"></a><span class="lineno"> 1792</span>&#160;    {</div><div class="line"><a name="l01793"></a><span class="lineno"> 1793</span>&#160;        ValueType temp_deg = <a class="code" href="namespacettmath.html#ac2fd073af0bd959717ac1a5784e5110d">DegToDeg</a>(d,m,s,err);</div><div class="line"><a name="l01794"></a><span class="lineno"> 1794</span>&#160;</div><div class="line"><a name="l01795"></a><span class="lineno"> 1795</span>&#160;        <span class="keywordflow">if</span>( err &amp;&amp; *err!=err_ok )</div><div class="line"><a name="l01796"></a><span class="lineno"> 1796</span>&#160;            <span class="keywordflow">return</span> temp_deg;</div><div class="line"><a name="l01797"></a><span class="lineno"> 1797</span>&#160;</div><div class="line"><a name="l01798"></a><span class="lineno"> 1798</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a4a9f4b16959a34525bccadd4fa5b3b31">DegToGrad</a>(temp_deg, err);</div><div class="line"><a name="l01799"></a><span class="lineno"> 1799</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a4a9f4b16959a34525bccadd4fa5b3b31"><div class="ttname"><a href="namespacettmath.html#a4a9f4b16959a34525bccadd4fa5b3b31">ttmath::DegToGrad</a></div><div class="ttdeci">ValueType DegToGrad(const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01790">ttmath.h:1790</a></div></div>
<div class="ttc" id="namespacettmath_html_ac2fd073af0bd959717ac1a5784e5110d"><div class="ttname"><a href="namespacettmath.html#ac2fd073af0bd959717ac1a5784e5110d">ttmath::DegToDeg</a></div><div class="ttdeci">ValueType DegToDeg(const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01633">ttmath.h:1633</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01633">DegToDeg()</a>, and <a class="el" href="ttmath_8h_source.html#l01758">DegToGrad()</a>.</p>

</div>
</div>
<a id="ac6aac6162783d4ad6c5d78729f7fd21c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6aac6162783d4ad6c5d78729f7fd21c">&#9670;&nbsp;</a></span>DegToRad() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::DegToRad </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts degrees to radians</p>
<p>it returns: x * pi / 180 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01552">1552</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>&#160;    {</div><div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160;    ValueType result, temp;</div><div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;</div><div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160;        {</div><div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>&#160;</div><div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>&#160;        }</div><div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>&#160;</div><div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>&#160;        result = x;</div><div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>&#160;</div><div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>&#160;        <span class="comment">// it is better to make division first and then multiplication</span></div><div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>&#160;        <span class="comment">// the result is more accurate especially when x is: 90,180,270 or 360</span></div><div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>&#160;        temp = 180;</div><div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>&#160;        c += result.Div(temp);</div><div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>&#160;</div><div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>&#160;        temp.SetPi();</div><div class="line"><a name="l01573"></a><span class="lineno"> 1573</span>&#160;        c += result.Mul(temp);</div><div class="line"><a name="l01574"></a><span class="lineno"> 1574</span>&#160;</div><div class="line"><a name="l01575"></a><span class="lineno"> 1575</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>&#160;</div><div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathparser_8h_source.html#l00777">ttmath::Parser&lt; ValueType &gt;::ConvertAngleToRad()</a>, and <a class="el" href="ttmath_8h_source.html#l01672">DegToRad()</a>.</p>

</div>
</div>
<a id="a25f85adf34074305414d7d7e4dbf1afd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25f85adf34074305414d7d7e4dbf1afd">&#9670;&nbsp;</a></span>DegToRad() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::DegToRad </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts degrees in the long format to radians </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01672">1672</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01674"></a><span class="lineno"> 1674</span>&#160;    {</div><div class="line"><a name="l01675"></a><span class="lineno"> 1675</span>&#160;        ValueType temp_deg = <a class="code" href="namespacettmath.html#ac2fd073af0bd959717ac1a5784e5110d">DegToDeg</a>(d,m,s,err);</div><div class="line"><a name="l01676"></a><span class="lineno"> 1676</span>&#160;</div><div class="line"><a name="l01677"></a><span class="lineno"> 1677</span>&#160;        <span class="keywordflow">if</span>( err &amp;&amp; *err!=err_ok )</div><div class="line"><a name="l01678"></a><span class="lineno"> 1678</span>&#160;            <span class="keywordflow">return</span> temp_deg;</div><div class="line"><a name="l01679"></a><span class="lineno"> 1679</span>&#160;</div><div class="line"><a name="l01680"></a><span class="lineno"> 1680</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a25f85adf34074305414d7d7e4dbf1afd">DegToRad</a>(temp_deg, err);</div><div class="line"><a name="l01681"></a><span class="lineno"> 1681</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_ac2fd073af0bd959717ac1a5784e5110d"><div class="ttname"><a href="namespacettmath.html#ac2fd073af0bd959717ac1a5784e5110d">ttmath::DegToDeg</a></div><div class="ttdeci">ValueType DegToDeg(const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01633">ttmath.h:1633</a></div></div>
<div class="ttc" id="namespacettmath_html_a25f85adf34074305414d7d7e4dbf1afd"><div class="ttname"><a href="namespacettmath.html#a25f85adf34074305414d7d7e4dbf1afd">ttmath::DegToRad</a></div><div class="ttdeci">ValueType DegToRad(const ValueType &amp;d, const ValueType &amp;m, const ValueType &amp;s, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01672">ttmath.h:1672</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01633">DegToDeg()</a>, and <a class="el" href="ttmath_8h_source.html#l01552">DegToRad()</a>.</p>

</div>
</div>
<a id="ad2f2347d11b3124a6d4c12b97b87f9b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2f2347d11b3124a6d4c12b97b87f9b1">&#9670;&nbsp;</a></span>Exp()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Exp </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the expression e^x </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00323">323</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        {</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;        }</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        ValueType result;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = result.Exp(x);</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ae0a248c8618c9ac4e3edf6095fe31f92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0a248c8618c9ac4e3edf6095fe31f92">&#9670;&nbsp;</a></span>Factorial() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Factorial </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structttmath_1_1_c_gamma.html">CGamma</a>&lt; ValueType &gt; &amp;&#160;</td>
          <td class="paramname"><em>cgamma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const volatile <a class="el" href="classttmath_1_1_stop_calculating.html">StopCalculating</a> *&#160;</td>
          <td class="paramname"><em>stop</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the factorial from given 'x' e.g. Factorial(4) = 4! = 1*2*3*4</p>
<p>it's multithread safe, you should create a CGamma&lt;&gt; object and use it whenever you call the <a class="el" href="namespacettmath.html#ae0a248c8618c9ac4e3edf6095fe31f92">Factorial()</a> e.g. </p><pre class="fragment">typedef Big&lt;1,2&gt; MyBig;
MyBig x=234, y=54345;
CGamma&lt;MyBig&gt; cgamma;
std::cout &lt;&lt; Factorial(x, cgamma) &lt;&lt; std::endl;
std::cout &lt;&lt; Factorial(y, cgamma) &lt;&lt; std::endl;
</pre><p>in the CGamma&lt;&gt; object the function stores some coefficients (factorials, Bernoulli numbers), and they will be reused in next calls to the function</p>
<p>each thread should have its own CGamma&lt;&gt; object, and you can use these objects with <a class="el" href="namespacettmath.html#aaf1312e301f4800c67164f4eb8a5e017">Gamma()</a> function too </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02809">2809</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02811"></a><span class="lineno"> 2811</span>&#160;    {</div><div class="line"><a name="l02812"></a><span class="lineno"> 2812</span>&#160;        <span class="keywordflow">return</span> auxiliaryfunctions::Factorial2(x, &amp;cgamma, err, stop);</div><div class="line"><a name="l02813"></a><span class="lineno"> 2813</span>&#160;    }</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathparser_8h_source.html#l00838">ttmath::Parser&lt; ValueType &gt;::Factorial()</a>.</p>

</div>
</div>
<a id="ab8d7f0fbe3a72a59c32717f8eafe5857"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8d7f0fbe3a72a59c32717f8eafe5857">&#9670;&nbsp;</a></span>Factorial() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Factorial </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the factorial from given 'x' e.g. Factorial(4) = 4! = 1*2*3*4</p>
<p>note: this function should be used only in a single-thread environment </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02824">2824</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02825"></a><span class="lineno"> 2825</span>&#160;    {</div><div class="line"><a name="l02826"></a><span class="lineno"> 2826</span>&#160;        <span class="keywordflow">return</span> auxiliaryfunctions::Factorial2(x, (CGamma&lt;ValueType&gt;*)0, err, 0);</div><div class="line"><a name="l02827"></a><span class="lineno"> 2827</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a id="a8fde4af46141a3aad68c8081489fd70f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fde4af46141a3aad68c8081489fd70f">&#9670;&nbsp;</a></span>Floor()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Floor </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function returns a value representing the largest integer that is less than or equal to x</p>
<ul>
<li>Floor(-3.6) = -4</li>
<li>Floor(-3.1) = -4</li>
<li>Floor(-3) = -3</li>
<li>Floor(2) = 2</li>
<li>Floor(2.3) = 2</li>
<li>Floor(2.8) = 2 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00189">189</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    {</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        {</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        }</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        ValueType result(x);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        result.SkipFraction();</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">if</span>( result != x )</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        {</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            <span class="comment">// x is with fraction</span></div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            <span class="comment">// if x is positive we don&#39;t have to do anything</span></div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            <span class="keywordflow">if</span>( x.IsSign() )</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            {</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;                ValueType one;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                one.SetOne();</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                c += result.Sub(one);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            }</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        }</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <span class="keywordflow">return</span> result;  </div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aaf1312e301f4800c67164f4eb8a5e017"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf1312e301f4800c67164f4eb8a5e017">&#9670;&nbsp;</a></span>Gamma() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Gamma </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structttmath_1_1_c_gamma.html">CGamma</a>&lt; ValueType &gt; &amp;&#160;</td>
          <td class="paramname"><em>cgamma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const volatile <a class="el" href="classttmath_1_1_stop_calculating.html">StopCalculating</a> *&#160;</td>
          <td class="paramname"><em>stop</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Gamma function</p>
<p>it's multithread safe, you should create a CGamma&lt;&gt; object and use it whenever you call the <a class="el" href="namespacettmath.html#aaf1312e301f4800c67164f4eb8a5e017">Gamma()</a> e.g. </p><pre class="fragment">typedef Big&lt;1,2&gt; MyBig;
MyBig x=234, y=345.53;
CGamma&lt;MyBig&gt; cgamma;
std::cout &lt;&lt; Gamma(x, cgamma) &lt;&lt; std::endl;
std::cout &lt;&lt; Gamma(y, cgamma) &lt;&lt; std::endl;
</pre><p>in the CGamma&lt;&gt; object the function stores some coefficients (factorials, Bernoulli numbers), and they will be reused in next calls to the function</p>
<p>each thread should have its own CGamma&lt;&gt; object, and you can use these objects with <a class="el" href="namespacettmath.html#ae0a248c8618c9ac4e3edf6095fe31f92">Factorial()</a> function too </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02679">2679</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02681"></a><span class="lineno"> 2681</span>&#160;    {</div><div class="line"><a name="l02682"></a><span class="lineno"> 2682</span>&#160;    <span class="keyword">using namespace </span>auxiliaryfunctions;</div><div class="line"><a name="l02683"></a><span class="lineno"> 2683</span>&#160;</div><div class="line"><a name="l02684"></a><span class="lineno"> 2684</span>&#160;    ValueType result;</div><div class="line"><a name="l02685"></a><span class="lineno"> 2685</span>&#160;    <a class="code" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> err_tmp;</div><div class="line"><a name="l02686"></a><span class="lineno"> 2686</span>&#160;</div><div class="line"><a name="l02687"></a><span class="lineno"> 2687</span>&#160;        <span class="keywordflow">if</span>( n.IsNan() )</div><div class="line"><a name="l02688"></a><span class="lineno"> 2688</span>&#160;        {</div><div class="line"><a name="l02689"></a><span class="lineno"> 2689</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02690"></a><span class="lineno"> 2690</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l02691"></a><span class="lineno"> 2691</span>&#160;</div><div class="line"><a name="l02692"></a><span class="lineno"> 2692</span>&#160;        <span class="keywordflow">return</span> n;</div><div class="line"><a name="l02693"></a><span class="lineno"> 2693</span>&#160;        }</div><div class="line"><a name="l02694"></a><span class="lineno"> 2694</span>&#160;</div><div class="line"><a name="l02695"></a><span class="lineno"> 2695</span>&#160;        <span class="keywordflow">if</span>( cgamma.history.Get(n, result, err_tmp) )</div><div class="line"><a name="l02696"></a><span class="lineno"> 2696</span>&#160;        {</div><div class="line"><a name="l02697"></a><span class="lineno"> 2697</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02698"></a><span class="lineno"> 2698</span>&#160;                *err = err_tmp;</div><div class="line"><a name="l02699"></a><span class="lineno"> 2699</span>&#160;</div><div class="line"><a name="l02700"></a><span class="lineno"> 2700</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l02701"></a><span class="lineno"> 2701</span>&#160;        }</div><div class="line"><a name="l02702"></a><span class="lineno"> 2702</span>&#160;</div><div class="line"><a name="l02703"></a><span class="lineno"> 2703</span>&#160;        err_tmp = err_ok;</div><div class="line"><a name="l02704"></a><span class="lineno"> 2704</span>&#160;</div><div class="line"><a name="l02705"></a><span class="lineno"> 2705</span>&#160;        <span class="keywordflow">if</span>( n.IsSign() )</div><div class="line"><a name="l02706"></a><span class="lineno"> 2706</span>&#160;        {</div><div class="line"><a name="l02707"></a><span class="lineno"> 2707</span>&#160;            result = GammaMinus(n, cgamma, err_tmp, stop);</div><div class="line"><a name="l02708"></a><span class="lineno"> 2708</span>&#160;        }</div><div class="line"><a name="l02709"></a><span class="lineno"> 2709</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l02710"></a><span class="lineno"> 2710</span>&#160;        <span class="keywordflow">if</span>( n.IsZero() )</div><div class="line"><a name="l02711"></a><span class="lineno"> 2711</span>&#160;        {</div><div class="line"><a name="l02712"></a><span class="lineno"> 2712</span>&#160;            err_tmp = err_improper_argument;</div><div class="line"><a name="l02713"></a><span class="lineno"> 2713</span>&#160;            result.SetNan();</div><div class="line"><a name="l02714"></a><span class="lineno"> 2714</span>&#160;        }</div><div class="line"><a name="l02715"></a><span class="lineno"> 2715</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l02716"></a><span class="lineno"> 2716</span>&#160;        {</div><div class="line"><a name="l02717"></a><span class="lineno"> 2717</span>&#160;            result = GammaPlus(n, cgamma, err_tmp, stop);</div><div class="line"><a name="l02718"></a><span class="lineno"> 2718</span>&#160;        }</div><div class="line"><a name="l02719"></a><span class="lineno"> 2719</span>&#160;</div><div class="line"><a name="l02720"></a><span class="lineno"> 2720</span>&#160;        <span class="keywordflow">if</span>( result.IsNan() &amp;&amp; err_tmp==err_ok )</div><div class="line"><a name="l02721"></a><span class="lineno"> 2721</span>&#160;            err_tmp = err_overflow;</div><div class="line"><a name="l02722"></a><span class="lineno"> 2722</span>&#160;</div><div class="line"><a name="l02723"></a><span class="lineno"> 2723</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02724"></a><span class="lineno"> 2724</span>&#160;            *err = err_tmp;</div><div class="line"><a name="l02725"></a><span class="lineno"> 2725</span>&#160;</div><div class="line"><a name="l02726"></a><span class="lineno"> 2726</span>&#160;        <span class="keywordflow">if</span>( stop &amp;&amp; !stop-&gt;WasStopSignal() )</div><div class="line"><a name="l02727"></a><span class="lineno"> 2727</span>&#160;            cgamma.history.Add(n, result, err_tmp);</div><div class="line"><a name="l02728"></a><span class="lineno"> 2728</span>&#160;</div><div class="line"><a name="l02729"></a><span class="lineno"> 2729</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l02730"></a><span class="lineno"> 2730</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_af99599ccaf4dc05cc3a74277f9579942"><div class="ttname"><a href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ttmath::ErrorCode</a></div><div class="ttdeci">ErrorCode</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00370">ttmathtypes.h:370</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmathobjects_8h_source.html#l00782">ttmath::CGamma&lt; ValueType &gt;::history</a>.</p>

<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l02739">Gamma()</a>, and <a class="el" href="ttmath_8h_source.html#l02840">ttmath::CGamma&lt; ValueType &gt;::InitAll()</a>.</p>

</div>
</div>
<a id="a9dc16e4ff84855b18fa0def0115beeb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dc16e4ff84855b18fa0def0115beeb0">&#9670;&nbsp;</a></span>Gamma() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Gamma </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Gamma function</p>
<p>note: this function should be used only in a single-thread environment </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02739">2739</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02740"></a><span class="lineno"> 2740</span>&#160;    {</div><div class="line"><a name="l02741"></a><span class="lineno"> 2741</span>&#160;    <span class="comment">// warning: this static object is not thread safe</span></div><div class="line"><a name="l02742"></a><span class="lineno"> 2742</span>&#160;    <span class="keyword">static</span> CGamma&lt;ValueType&gt; cgamma;</div><div class="line"><a name="l02743"></a><span class="lineno"> 2743</span>&#160;</div><div class="line"><a name="l02744"></a><span class="lineno"> 2744</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a9dc16e4ff84855b18fa0def0115beeb0">Gamma</a>(n, cgamma, err);</div><div class="line"><a name="l02745"></a><span class="lineno"> 2745</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a9dc16e4ff84855b18fa0def0115beeb0"><div class="ttname"><a href="namespacettmath.html#a9dc16e4ff84855b18fa0def0115beeb0">ttmath::Gamma</a></div><div class="ttdeci">ValueType Gamma(const ValueType &amp;n, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l02739">ttmath.h:2739</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l02679">Gamma()</a>.</p>

</div>
</div>
<a id="a52eafea0946a3eda59db19fce03abd78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52eafea0946a3eda59db19fce03abd78">&#9670;&nbsp;</a></span>GradToDeg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::GradToDeg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts degrees to gradians</p>
<p>it returns: x * 180 / 200 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01808">1808</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01809"></a><span class="lineno"> 1809</span>&#160;    {</div><div class="line"><a name="l01810"></a><span class="lineno"> 1810</span>&#160;    ValueType result, temp;</div><div class="line"><a name="l01811"></a><span class="lineno"> 1811</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01812"></a><span class="lineno"> 1812</span>&#160;</div><div class="line"><a name="l01813"></a><span class="lineno"> 1813</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01814"></a><span class="lineno"> 1814</span>&#160;        {</div><div class="line"><a name="l01815"></a><span class="lineno"> 1815</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01816"></a><span class="lineno"> 1816</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01817"></a><span class="lineno"> 1817</span>&#160;</div><div class="line"><a name="l01818"></a><span class="lineno"> 1818</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01819"></a><span class="lineno"> 1819</span>&#160;        }</div><div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>&#160;</div><div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>&#160;        result = x;</div><div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;</div><div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>&#160;        temp = 180;</div><div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>&#160;        c += result.Mul(temp);</div><div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>&#160;</div><div class="line"><a name="l01826"></a><span class="lineno"> 1826</span>&#160;        temp = 200;</div><div class="line"><a name="l01827"></a><span class="lineno"> 1827</span>&#160;        c += result.Div(temp);</div><div class="line"><a name="l01828"></a><span class="lineno"> 1828</span>&#160;</div><div class="line"><a name="l01829"></a><span class="lineno"> 1829</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01830"></a><span class="lineno"> 1830</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01831"></a><span class="lineno"> 1831</span>&#160;</div><div class="line"><a name="l01832"></a><span class="lineno"> 1832</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a16791351b7f09a2500c3bbd767a6d074"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16791351b7f09a2500c3bbd767a6d074">&#9670;&nbsp;</a></span>GradToRad()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::GradToRad </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts gradians to radians</p>
<p>it returns: x * pi / 200 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01690">1690</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01691"></a><span class="lineno"> 1691</span>&#160;    {</div><div class="line"><a name="l01692"></a><span class="lineno"> 1692</span>&#160;    ValueType result, temp;</div><div class="line"><a name="l01693"></a><span class="lineno"> 1693</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01694"></a><span class="lineno"> 1694</span>&#160;</div><div class="line"><a name="l01695"></a><span class="lineno"> 1695</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01696"></a><span class="lineno"> 1696</span>&#160;        {</div><div class="line"><a name="l01697"></a><span class="lineno"> 1697</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01698"></a><span class="lineno"> 1698</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01699"></a><span class="lineno"> 1699</span>&#160;</div><div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01701"></a><span class="lineno"> 1701</span>&#160;        }</div><div class="line"><a name="l01702"></a><span class="lineno"> 1702</span>&#160;</div><div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>&#160;        result = x;</div><div class="line"><a name="l01704"></a><span class="lineno"> 1704</span>&#160;</div><div class="line"><a name="l01705"></a><span class="lineno"> 1705</span>&#160;        <span class="comment">// it is better to make division first and then multiplication</span></div><div class="line"><a name="l01706"></a><span class="lineno"> 1706</span>&#160;        <span class="comment">// the result is more accurate especially when x is: 100,200,300 or 400</span></div><div class="line"><a name="l01707"></a><span class="lineno"> 1707</span>&#160;        temp = 200;</div><div class="line"><a name="l01708"></a><span class="lineno"> 1708</span>&#160;        c += result.Div(temp);</div><div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>&#160;</div><div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>&#160;        temp.SetPi();</div><div class="line"><a name="l01711"></a><span class="lineno"> 1711</span>&#160;        c += result.Mul(temp);</div><div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>&#160;</div><div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01714"></a><span class="lineno"> 1714</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>&#160;</div><div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathparser_8h_source.html#l00777">ttmath::Parser&lt; ValueType &gt;::ConvertAngleToRad()</a>.</p>

</div>
</div>
<a id="abc53780b7e2e744d0a680d8fae0d266a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc53780b7e2e744d0a680d8fae0d266a">&#9670;&nbsp;</a></span>Ln()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Ln </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the natural logarithm (logarithm with the base 'e') </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00237">237</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    {</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        {</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        }</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        ValueType result;</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> state = result.Ln(x);</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        {</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keywordflow">switch</span>( state )</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            {</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            <span class="keywordflow">case</span> 0:</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                *err = err_ok;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            <span class="keywordflow">case</span> 1:</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                *err = err_overflow;</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <span class="keywordflow">case</span> 2:</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;            <span class="keywordflow">default</span>:</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                *err = err_internal_error;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            }</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="af773d2cf23612ce54bd229c506f2e884"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af773d2cf23612ce54bd229c506f2e884">&#9670;&nbsp;</a></span>Log()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Log </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the logarithm </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00278">278</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    {</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        {</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            <span class="keywordflow">if</span>( err ) *err = err_improper_argument;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            <span class="keywordflow">return</span> x;</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        }</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <span class="keywordflow">if</span>( base.IsNan() )</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        {</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;            <span class="keywordflow">if</span>( err ) *err = err_improper_argument;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;            <span class="keywordflow">return</span> base;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        }</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        ValueType result;</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> state = result.Log(x, base);</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        {</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;            <span class="keywordflow">switch</span>( state )</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;            {</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;            <span class="keywordflow">case</span> 0:</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;                *err = err_ok;</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;            <span class="keywordflow">case</span> 1:</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;                *err = err_overflow;</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;            <span class="keywordflow">case</span> 2:</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            <span class="keywordflow">case</span> 3:</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="keywordflow">default</span>:</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;                *err = err_internal_error;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;            }</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        }</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a53024d1c0076793b6ef66da1595e7ebf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53024d1c0076793b6ef66da1595e7ebf">&#9670;&nbsp;</a></span>Mod()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Mod </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the remainder from a division</p>
<p>samples:</p><ul>
<li>mod( 12.6 ; 3) = 0.6 because 12.6 = 3*4 + 0.6</li>
<li>mod(-12.6 ; 3) = -0.6 bacause -12.6 = 3*(-4) + (-0.6)</li>
<li>mod( 12.6 ; -3) = 0.6</li>
<li>mod(-12.6 ; -3) = -0.6 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02173">2173</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02174"></a><span class="lineno"> 2174</span>&#160;    {</div><div class="line"><a name="l02175"></a><span class="lineno"> 2175</span>&#160;        <span class="keywordflow">if</span>( a.IsNan() || b.IsNan() )</div><div class="line"><a name="l02176"></a><span class="lineno"> 2176</span>&#160;        {</div><div class="line"><a name="l02177"></a><span class="lineno"> 2177</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02178"></a><span class="lineno"> 2178</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l02179"></a><span class="lineno"> 2179</span>&#160;</div><div class="line"><a name="l02180"></a><span class="lineno"> 2180</span>&#160;            a.SetNan();</div><div class="line"><a name="l02181"></a><span class="lineno"> 2181</span>&#160;</div><div class="line"><a name="l02182"></a><span class="lineno"> 2182</span>&#160;        <span class="keywordflow">return</span> a;</div><div class="line"><a name="l02183"></a><span class="lineno"> 2183</span>&#160;        }</div><div class="line"><a name="l02184"></a><span class="lineno"> 2184</span>&#160;</div><div class="line"><a name="l02185"></a><span class="lineno"> 2185</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = a.Mod(b);</div><div class="line"><a name="l02186"></a><span class="lineno"> 2186</span>&#160;</div><div class="line"><a name="l02187"></a><span class="lineno"> 2187</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02188"></a><span class="lineno"> 2188</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l02189"></a><span class="lineno"> 2189</span>&#160;</div><div class="line"><a name="l02190"></a><span class="lineno"> 2190</span>&#160;    <span class="keywordflow">return</span> a;</div><div class="line"><a name="l02191"></a><span class="lineno"> 2191</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aa5ef6c79581805ee4c0bbfd731857511"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5ef6c79581805ee4c0bbfd731857511">&#9670;&nbsp;</a></span>RadToDeg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::RadToDeg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts radians to degrees</p>
<p>it returns: x * 180 / pi </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01588">1588</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01589"></a><span class="lineno"> 1589</span>&#160;    {</div><div class="line"><a name="l01590"></a><span class="lineno"> 1590</span>&#160;    ValueType result, delimiter;</div><div class="line"><a name="l01591"></a><span class="lineno"> 1591</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01592"></a><span class="lineno"> 1592</span>&#160;</div><div class="line"><a name="l01593"></a><span class="lineno"> 1593</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>&#160;        {</div><div class="line"><a name="l01595"></a><span class="lineno"> 1595</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01596"></a><span class="lineno"> 1596</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01597"></a><span class="lineno"> 1597</span>&#160;</div><div class="line"><a name="l01598"></a><span class="lineno"> 1598</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01599"></a><span class="lineno"> 1599</span>&#160;        }</div><div class="line"><a name="l01600"></a><span class="lineno"> 1600</span>&#160;</div><div class="line"><a name="l01601"></a><span class="lineno"> 1601</span>&#160;        result = 180;</div><div class="line"><a name="l01602"></a><span class="lineno"> 1602</span>&#160;        c += result.Mul(x);</div><div class="line"><a name="l01603"></a><span class="lineno"> 1603</span>&#160;</div><div class="line"><a name="l01604"></a><span class="lineno"> 1604</span>&#160;        delimiter.SetPi();</div><div class="line"><a name="l01605"></a><span class="lineno"> 1605</span>&#160;        c += result.Div(delimiter);</div><div class="line"><a name="l01606"></a><span class="lineno"> 1606</span>&#160;</div><div class="line"><a name="l01607"></a><span class="lineno"> 1607</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01608"></a><span class="lineno"> 1608</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01609"></a><span class="lineno"> 1609</span>&#160;</div><div class="line"><a name="l01610"></a><span class="lineno"> 1610</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathparser_8h_source.html#l00800">ttmath::Parser&lt; ValueType &gt;::ConvertRadToAngle()</a>.</p>

</div>
</div>
<a id="a1a1aa0f61f5e74abf53c7b36cef77d75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a1aa0f61f5e74abf53c7b36cef77d75">&#9670;&nbsp;</a></span>RadToGrad()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::RadToGrad </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function converts radians to gradians</p>
<p>it returns: x * 200 / pi </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01726">1726</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>&#160;    {</div><div class="line"><a name="l01728"></a><span class="lineno"> 1728</span>&#160;    ValueType result, delimiter;</div><div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>&#160;    <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01730"></a><span class="lineno"> 1730</span>&#160;</div><div class="line"><a name="l01731"></a><span class="lineno"> 1731</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>&#160;        {</div><div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01734"></a><span class="lineno"> 1734</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01735"></a><span class="lineno"> 1735</span>&#160;</div><div class="line"><a name="l01736"></a><span class="lineno"> 1736</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01737"></a><span class="lineno"> 1737</span>&#160;        }</div><div class="line"><a name="l01738"></a><span class="lineno"> 1738</span>&#160;</div><div class="line"><a name="l01739"></a><span class="lineno"> 1739</span>&#160;        result = 200;</div><div class="line"><a name="l01740"></a><span class="lineno"> 1740</span>&#160;        c += result.Mul(x);</div><div class="line"><a name="l01741"></a><span class="lineno"> 1741</span>&#160;</div><div class="line"><a name="l01742"></a><span class="lineno"> 1742</span>&#160;        delimiter.SetPi();</div><div class="line"><a name="l01743"></a><span class="lineno"> 1743</span>&#160;        c += result.Div(delimiter);</div><div class="line"><a name="l01744"></a><span class="lineno"> 1744</span>&#160;</div><div class="line"><a name="l01745"></a><span class="lineno"> 1745</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01746"></a><span class="lineno"> 1746</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01747"></a><span class="lineno"> 1747</span>&#160;</div><div class="line"><a name="l01748"></a><span class="lineno"> 1748</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l01749"></a><span class="lineno"> 1749</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathparser_8h_source.html#l00800">ttmath::Parser&lt; ValueType &gt;::ConvertRadToAngle()</a>.</p>

</div>
</div>
<a id="a3b83986f71f6f78d6b0eb33d0e832654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b83986f71f6f78d6b0eb33d0e832654">&#9670;&nbsp;</a></span>Root()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Root </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>caltulate the index'th Root of x</p>
<p>index must be integer and not negative &lt;0;1;2;3....)</p>
<ul>
<li>if index==0 the result is one</li>
<li>if x==0 the result is zero and we assume root(0;0) is not defined</li>
<li>if index is even (2;4;6...) the result is x^(1/index) and x&gt;0</li>
<li>if index is odd (1;2;3;...) the result is either<ul>
<li>-(abs(x)^(1/index)) if x&lt;0, or</li>
<li>x^(1/index)) if x&gt;0</li>
</ul>
</li>
<li>for index==1 the result is equal x </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02076">2076</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02077"></a><span class="lineno"> 2077</span>&#160;    {</div><div class="line"><a name="l02078"></a><span class="lineno"> 2078</span>&#160;        <span class="keyword">using namespace </span>auxiliaryfunctions;</div><div class="line"><a name="l02079"></a><span class="lineno"> 2079</span>&#160;</div><div class="line"><a name="l02080"></a><span class="lineno"> 2080</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() || index.IsNan() )</div><div class="line"><a name="l02081"></a><span class="lineno"> 2081</span>&#160;        {</div><div class="line"><a name="l02082"></a><span class="lineno"> 2082</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02083"></a><span class="lineno"> 2083</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l02084"></a><span class="lineno"> 2084</span>&#160;</div><div class="line"><a name="l02085"></a><span class="lineno"> 2085</span>&#160;            x.SetNan();</div><div class="line"><a name="l02086"></a><span class="lineno"> 2086</span>&#160;</div><div class="line"><a name="l02087"></a><span class="lineno"> 2087</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02088"></a><span class="lineno"> 2088</span>&#160;        }</div><div class="line"><a name="l02089"></a><span class="lineno"> 2089</span>&#160;</div><div class="line"><a name="l02090"></a><span class="lineno"> 2090</span>&#160;        <span class="keywordflow">if</span>( RootCheckIndexSign(x, index, err) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02091"></a><span class="lineno"> 2091</span>&#160;        <span class="keywordflow">if</span>( RootCheckIndexZero(x, index, err) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02092"></a><span class="lineno"> 2092</span>&#160;        <span class="keywordflow">if</span>( RootCheckIndexOne (   index, err) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02093"></a><span class="lineno"> 2093</span>&#160;        <span class="keywordflow">if</span>( RootCheckIndexTwo (x, index, err) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02094"></a><span class="lineno"> 2094</span>&#160;        <span class="keywordflow">if</span>( RootCheckIndexFrac(x, index, err) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02095"></a><span class="lineno"> 2095</span>&#160;        <span class="keywordflow">if</span>( RootCheckXZero    (x,        err) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02096"></a><span class="lineno"> 2096</span>&#160;</div><div class="line"><a name="l02097"></a><span class="lineno"> 2097</span>&#160;        <span class="comment">// index integer and index!=0</span></div><div class="line"><a name="l02098"></a><span class="lineno"> 2098</span>&#160;        <span class="comment">// x!=0</span></div><div class="line"><a name="l02099"></a><span class="lineno"> 2099</span>&#160;</div><div class="line"><a name="l02100"></a><span class="lineno"> 2100</span>&#160;        ValueType old_x(x);</div><div class="line"><a name="l02101"></a><span class="lineno"> 2101</span>&#160;        <span class="keywordtype">bool</span> change_sign;</div><div class="line"><a name="l02102"></a><span class="lineno"> 2102</span>&#160;</div><div class="line"><a name="l02103"></a><span class="lineno"> 2103</span>&#160;        <span class="keywordflow">if</span>( RootCheckIndex(x, index, err, &amp;change_sign ) ) <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02104"></a><span class="lineno"> 2104</span>&#160;</div><div class="line"><a name="l02105"></a><span class="lineno"> 2105</span>&#160;        ValueType temp;</div><div class="line"><a name="l02106"></a><span class="lineno"> 2106</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l02107"></a><span class="lineno"> 2107</span>&#160;</div><div class="line"><a name="l02108"></a><span class="lineno"> 2108</span>&#160;        <span class="comment">// we&#39;re using the formula: root(x ; n) = exp( ln(x) / n )</span></div><div class="line"><a name="l02109"></a><span class="lineno"> 2109</span>&#160;        c += temp.Ln(x);</div><div class="line"><a name="l02110"></a><span class="lineno"> 2110</span>&#160;        c += temp.Div(index);</div><div class="line"><a name="l02111"></a><span class="lineno"> 2111</span>&#160;        c += x.Exp(temp);</div><div class="line"><a name="l02112"></a><span class="lineno"> 2112</span>&#160;</div><div class="line"><a name="l02113"></a><span class="lineno"> 2113</span>&#160;        <span class="keywordflow">if</span>( change_sign )</div><div class="line"><a name="l02114"></a><span class="lineno"> 2114</span>&#160;        {</div><div class="line"><a name="l02115"></a><span class="lineno"> 2115</span>&#160;            <span class="comment">// x is different from zero</span></div><div class="line"><a name="l02116"></a><span class="lineno"> 2116</span>&#160;            x.SetSign();</div><div class="line"><a name="l02117"></a><span class="lineno"> 2117</span>&#160;        }</div><div class="line"><a name="l02118"></a><span class="lineno"> 2118</span>&#160;</div><div class="line"><a name="l02119"></a><span class="lineno"> 2119</span>&#160;        c += RootCorrectInteger(old_x, x, index);</div><div class="line"><a name="l02120"></a><span class="lineno"> 2120</span>&#160;</div><div class="line"><a name="l02121"></a><span class="lineno"> 2121</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l02122"></a><span class="lineno"> 2122</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l02123"></a><span class="lineno"> 2123</span>&#160;</div><div class="line"><a name="l02124"></a><span class="lineno"> 2124</span>&#160;    <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02125"></a><span class="lineno"> 2125</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a0c925f364f30f9d23f417ab7cc5689ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c925f364f30f9d23f417ab7cc5689ee">&#9670;&nbsp;</a></span>Round()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Round </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function rounds to the nearest integer value</p>
<p>samples</p><ul>
<li>2.2 = 2</li>
<li>2.7 = 3</li>
<li>-2.2 = -2</li>
<li>-2.7 = -3 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00109">109</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        }</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        ValueType result( x );</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = result.Round();</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ae489b629ef0887bdb3d9aa94e40383ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae489b629ef0887bdb3d9aa94e40383ae">&#9670;&nbsp;</a></span>Sgn()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Sgn </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>it returns the sign of the value</p>
<p>samples:</p><ul>
<li>-2 = -1</li>
<li>0 = 0</li>
<li>10 = 1 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l02155">2155</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l02156"></a><span class="lineno"> 2156</span>&#160;    {</div><div class="line"><a name="l02157"></a><span class="lineno"> 2157</span>&#160;        x.Sgn();</div><div class="line"><a name="l02158"></a><span class="lineno"> 2158</span>&#160;</div><div class="line"><a name="l02159"></a><span class="lineno"> 2159</span>&#160;    <span class="keywordflow">return</span> x;</div><div class="line"><a name="l02160"></a><span class="lineno"> 2160</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a id="aadad290da85b89abcd3468c4ad38f556"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadad290da85b89abcd3468c4ad38f556">&#9670;&nbsp;</a></span>Sin()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Sin </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Sine </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00525">525</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    {</div><div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;    <span class="keyword">using namespace </span>auxiliaryfunctions;</div><div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;</div><div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    ValueType one, result;</div><div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    <span class="keywordtype">bool</span> change_sign;   </div><div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    </div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        {</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;        }</div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;</div><div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;            *err = err_ok;</div><div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;</div><div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;        <span class="keywordflow">if</span>( PrepareSin( x, change_sign ) )</div><div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;        {</div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;            <span class="comment">// x is too big, we cannnot reduce the 2*PI period</span></div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;            <span class="comment">// prior to version 0.8.5 the result was zero</span></div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;            </div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;            <span class="comment">// result has NaN flag set by default</span></div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;                *err = err_overflow; <span class="comment">// maybe another error code? err_improper_argument?</span></div><div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;</div><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;        <span class="keywordflow">return</span> result; <span class="comment">// NaN is set by default</span></div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;        }</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;</div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;        result = Sin0pi05( x );</div><div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;    </div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;        one.SetOne();</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;        <span class="comment">// after calculations there can be small distortions in the result</span></div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;        <span class="keywordflow">if</span>( result &gt; one )</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;            result = one;</div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;        <span class="keywordflow">if</span>( result.IsSign() )</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;            <span class="comment">// we&#39;ve calculated the sin from &lt;0, pi/2&gt; and the result</span></div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;            <span class="comment">// should be positive</span></div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;            result.SetZero();</div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;        <span class="keywordflow">if</span>( change_sign )</div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;            result.ChangeSign();    </div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;        </div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    }</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l00581">Cos()</a>, <a class="el" href="ttmath_8h_source.html#l00661">Cot()</a>, and <a class="el" href="ttmath_8h_source.html#l00619">Tan()</a>.</p>

</div>
</div>
<a id="abb7d8f5511b29ed42fa46c5d6da45140"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb7d8f5511b29ed42fa46c5d6da45140">&#9670;&nbsp;</a></span>Sinh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Sinh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Hyperbolic Sine</p>
<p>we're using the formula sinh(x)= ( e^x - e^(-x) ) / 2 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01174">1174</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;    {</div><div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;        {</div><div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;</div><div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;        }</div><div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;</div><div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;        ValueType ex, emx;</div><div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;</div><div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;        c += ex.Exp(x);</div><div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;        c += emx.Exp(-x);</div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;</div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;        c += ex.Sub(emx);</div><div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;        c += ex.exponent.SubOne();</div><div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;</div><div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160;</div><div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>&#160;    <span class="keywordflow">return</span> ex;</div><div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="add9faf7afbd33a91df3e3977789e741f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add9faf7afbd33a91df3e3977789e741f">&#9670;&nbsp;</a></span>SkipFraction()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::SkipFraction </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function skips the fraction from x</p>
<p>samples</p><ul>
<li>2.2 = 2</li>
<li>2.7 = 2</li>
<li>-2.2 = 2</li>
<li>-2.7 = 2 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00090">90</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        ValueType result( x );</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        result.SkipFraction();</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div></div><!-- fragment -->
</div>
</div>
<a id="a4ef68f4994c6c514e97fd44f1d850f0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ef68f4994c6c514e97fd44f1d850f0e">&#9670;&nbsp;</a></span>Sqrt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Sqrt </td>
          <td>(</td>
          <td class="paramtype">ValueType&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the square root</p>
<p>Sqrt(9) = 3 </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01852">1852</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01853"></a><span class="lineno"> 1853</span>&#160;    {</div><div class="line"><a name="l01854"></a><span class="lineno"> 1854</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() || x.IsSign() )</div><div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>&#160;        {</div><div class="line"><a name="l01856"></a><span class="lineno"> 1856</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01858"></a><span class="lineno"> 1858</span>&#160;</div><div class="line"><a name="l01859"></a><span class="lineno"> 1859</span>&#160;            x.SetNan();</div><div class="line"><a name="l01860"></a><span class="lineno"> 1860</span>&#160;</div><div class="line"><a name="l01861"></a><span class="lineno"> 1861</span>&#160;        <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01862"></a><span class="lineno"> 1862</span>&#160;        }</div><div class="line"><a name="l01863"></a><span class="lineno"> 1863</span>&#160;</div><div class="line"><a name="l01864"></a><span class="lineno"> 1864</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = x.Sqrt();</div><div class="line"><a name="l01865"></a><span class="lineno"> 1865</span>&#160;</div><div class="line"><a name="l01866"></a><span class="lineno"> 1866</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01867"></a><span class="lineno"> 1867</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01868"></a><span class="lineno"> 1868</span>&#160;</div><div class="line"><a name="l01869"></a><span class="lineno"> 1869</span>&#160;    <span class="keywordflow">return</span> x;</div><div class="line"><a name="l01870"></a><span class="lineno"> 1870</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="afa3658181511f2becb4a54e9888909c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa3658181511f2becb4a54e9888909c1">&#9670;&nbsp;</a></span>Tan()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Tan </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calulates the Tangent we're using the formula tan(x) = sin(x) / cos(x)</p>
<p>it takes more time than calculating the Tan directly from for example Taylor series but should be a bit preciser because Tan receives its values from -infinity to +infinity and when we calculate it from any series then we can make a greater mistake than calculating 'sin/cos' </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00619">619</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;    {</div><div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;        ValueType result = <a class="code" href="namespacettmath.html#a8e6c148c8360f8a1779d41e7ee8a20cc">Cos</a>(x, err);</div><div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;        </div><div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        <span class="keywordflow">if</span>( err &amp;&amp; *err != err_ok )</div><div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;</div><div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;        <span class="keywordflow">if</span>( result.IsZero() )</div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;        {</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;</div><div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;            result.SetNan();</div><div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;</div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;        <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;        }</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;</div><div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">Sin</a>(x, err) / result;</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_aadad290da85b89abcd3468c4ad38f556"><div class="ttname"><a href="namespacettmath.html#aadad290da85b89abcd3468c4ad38f556">ttmath::Sin</a></div><div class="ttdeci">ValueType Sin(ValueType x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00525">ttmath.h:525</a></div></div>
<div class="ttc" id="namespacettmath_html_a8e6c148c8360f8a1779d41e7ee8a20cc"><div class="ttname"><a href="namespacettmath.html#a8e6c148c8360f8a1779d41e7ee8a20cc">ttmath::Cos</a></div><div class="ttdeci">ValueType Cos(ValueType x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00581">ttmath.h:581</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l00581">Cos()</a>, and <a class="el" href="ttmath_8h_source.html#l00525">Sin()</a>.</p>

<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l00647">Tg()</a>.</p>

</div>
</div>
<a id="a61d39833ec57ac28ad81c018934c857a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61d39833ec57ac28ad81c018934c857a">&#9670;&nbsp;</a></span>Tanh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Tanh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Hyperbolic Tangent</p>
<p>we're using the formula tanh(x)= ( e^x - e^(-x) ) / ( e^x + e^(-x) ) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01238">1238</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;    {</div><div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160;        <span class="keywordflow">if</span>( x.IsNan() )</div><div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>&#160;        {</div><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160;            <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160;                *err = err_improper_argument;</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;</div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;        <span class="keywordflow">return</span> x; <span class="comment">// NaN</span></div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>&#160;        }</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;</div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160;        ValueType ex, emx, nominator, denominator;</div><div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>&#160;        <a class="code" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c = 0;</div><div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>&#160;</div><div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>&#160;        c += ex.Exp(x);</div><div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160;        c += emx.Exp(-x);</div><div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>&#160;</div><div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160;        nominator = ex;</div><div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>&#160;        c += nominator.Sub(emx);</div><div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>&#160;        denominator = ex;</div><div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160;        c += denominator.Add(emx);</div><div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;        </div><div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160;        c += nominator.Div(denominator);</div><div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>&#160;</div><div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160;        <span class="keywordflow">if</span>( err )</div><div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>&#160;            *err = c ? err_overflow : err_ok;</div><div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>&#160;</div><div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160;    <span class="keywordflow">return</span> nominator;</div><div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a5c1fccc9761aaa3d2b6dd32c224f5dac"><div class="ttname"><a href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">ttmath::uint</a></div><div class="ttdeci">uint64_t uint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00238">ttmathtypes.h:238</a></div></div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmath_8h_source.html#l01275">Tgh()</a>.</p>

</div>
</div>
<a id="a52e247c28a10f610b776f5a14a73ccc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52e247c28a10f610b776f5a14a73ccc9">&#9670;&nbsp;</a></span>Tg()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Tg </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calulates the Tangent look at the description of Tan(...)</p>
<p>(the abbreviation of Tangent can be 'tg' as well) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l00647">647</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;    {</div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#afa3658181511f2becb4a54e9888909c1">Tan</a>(x, err);</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_afa3658181511f2becb4a54e9888909c1"><div class="ttname"><a href="namespacettmath.html#afa3658181511f2becb4a54e9888909c1">ttmath::Tan</a></div><div class="ttdeci">ValueType Tan(const ValueType &amp;x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l00619">ttmath.h:619</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l00619">Tan()</a>.</p>

</div>
</div>
<a id="a3527548481a8319c1c12fd1f26dfe652"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3527548481a8319c1c12fd1f26dfe652">&#9670;&nbsp;</a></span>Tgh()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">ValueType ttmath::Tgh </td>
          <td>(</td>
          <td class="paramtype">const ValueType &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#af99599ccaf4dc05cc3a74277f9579942">ErrorCode</a> *&#160;</td>
          <td class="paramname"><em>err</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>this function calculates the Hyperbolic Tangent look at the description of Tanh(...)</p>
<p>(the abbreviation of Hyperbolic Tangent can be 'tgh' as well) </p>

<p class="definition">Definition at line <a class="el" href="ttmath_8h_source.html#l01275">1275</a> of file <a class="el" href="ttmath_8h_source.html">ttmath.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160;    {</div><div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a61d39833ec57ac28ad81c018934c857a">Tanh</a>(x, err);</div><div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>&#160;    }</div><div class="ttc" id="namespacettmath_html_a61d39833ec57ac28ad81c018934c857a"><div class="ttname"><a href="namespacettmath.html#a61d39833ec57ac28ad81c018934c857a">ttmath::Tanh</a></div><div class="ttdeci">ValueType Tanh(const ValueType &amp;x, ErrorCode *err=0)</div><div class="ttdef"><b>Definition:</b> <a href="ttmath_8h_source.html#l01238">ttmath.h:1238</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmath_8h_source.html#l01238">Tanh()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="af7ec4eb78a37bd53d8a6ec921be57288"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7ec4eb78a37bd53d8a6ec921be57288">&#9670;&nbsp;</a></span>ttmath_mutex</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pthread_mutex_t ttmath::ttmath_mutex</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>ttmath_mutex will be defined by TTMATH_MULTITHREADS_HELPER macro </p>

<p class="reference">Referenced by <a class="el" href="ttmaththreads_8h_source.html#l00197">ttmath::ThreadLock::Lock()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
